import request from '@/utils/request'
// 获取部门列表
export const getDeptList = () => {
  return request({
    url: '/company/department'
  })
}
// 获取部门负责人数据
export const getManager = () => {
  return request({
    url: '/sys/user/simple'
  })
}
// 添加部门接口
export const addDepts = (data) => {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 获取部门详情
export const getDeptDetail = (id) => {
  return request({
    url: `/company/department/${id}`
  })
}
// 更新部门详情
export const updateDeptDetail = (data) => {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
// 删除部门接口
export const delDept = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
